﻿@using Abp.Extensions
@using Abp.Application.Services.Dto
@using KDS.Mes.Web.Models.Common.Modals
@using KDS.Mes.Web.Models.ProductModes

@model CreateOrEditProductModeModalViewModel

@* 初始化头部 *@
@Html.Partial("~/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("EditProductMode") + ": " + Model.ProductMode.ProductModeName) : L("CreateProductMode")))

<!--html代码区域-->
<div class="modal-body">
    <form name="productModeInformationsForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="Id" value="@Model.ProductMode.Id" />
        <div>

            <div hidden="hidden">
                @if (Model.IsEditMode)
            {
                    <input type="hidden" name="Id" value="@Model.ProductMode.Id" />
                }
            </div>

            <div class="form-group ">
                <label>@L("ProductModeName")   <span class="required"> * </span>	 	</label>
                <input class="maxlength-handler form-control @(Model.ProductMode.ProductModeName.IsNullOrEmpty() ? "" : " edited")" type="text" name="ProductModeName" value="@Model.ProductMode.ProductModeName" required maxlength="20" />
            </div>

            <div class="form-group ">
                <label>@L("ProductModeCode")   <span class="required"> * </span>	 	</label>
                <input class="maxlength-handler form-control @(Model.ProductMode.ProductModeCode.IsNullOrEmpty() ? "" : " edited")" type="text" name="ProductModeCode" value="@Model.ProductMode.ProductModeCode" required maxlength="20" />
            </div>

            <div class="md-checkbox">
                <input id="EditProductMode_IsDefault" class="md-check" type="checkbox" name="IsDefault" value="true" @Html.Raw(Model.ProductMode.IsDefault ? "checked=\"checked\"" : "")>

                <label for="EditProductMode_IsDefault">
                    <span class="inc"></span>
                    <span class="check"></span>
                    <span class="box"></span>
                    @L("IsDefault")
                </label>
            </div>
        </div>
    </form>
</div>
@Html.Partial("~/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")